Optimal. Leaf size=72 \[ \frac{1}{8} x \left (8 a^2+8 a b+3 b^2\right )-\frac{b (8 a+3 b) \sin (e+f x) \cos (e+f x)}{8 f}-\frac{b^2 \sin ^3(e+f x) \cos (e+f x)}{4 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.020182, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {3179} \[ \frac{1}{8} x \left (8 a^2+8 a b+3 b^2\right )-\frac{b (8 a+3 b) \sin (e+f x) \cos (e+f x)}{8 f}-\frac{b^2 \sin ^3(e+f x) \cos (e+f x)}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3179
Rubi steps
\begin{align*} \int \left (a+b \sin ^2(e+f x)\right )^2 \, dx &=\frac{1}{8} \left (8 a^2+8 a b+3 b^2\right ) x-\frac{b (8 a+3 b) \cos (e+f x) \sin (e+f x)}{8 f}-\frac{b^2 \cos (e+f x) \sin ^3(e+f x)}{4 f}\\ \end{align*}
Mathematica [A] time = 0.116051, size = 58, normalized size = 0.81 \[ \frac{4 \left (8 a^2+8 a b+3 b^2\right ) (e+f x)-8 b (2 a+b) \sin (2 (e+f x))+b^2 \sin (4 (e+f x))}{32 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.03, size = 78, normalized size = 1.1 \begin{align*}{\frac{1}{f} \left ({b}^{2} \left ( -{\frac{\cos \left ( fx+e \right ) }{4} \left ( \left ( \sin \left ( fx+e \right ) \right ) ^{3}+{\frac{3\,\sin \left ( fx+e \right ) }{2}} \right ) }+{\frac{3\,fx}{8}}+{\frac{3\,e}{8}} \right ) +2\,ab \left ( -1/2\,\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) +1/2\,fx+e/2 \right ) +{a}^{2} \left ( fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.972697, size = 92, normalized size = 1.28 \begin{align*} a^{2} x + \frac{{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a b}{2 \, f} + \frac{{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2}}{32 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.95607, size = 143, normalized size = 1.99 \begin{align*} \frac{{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} f x +{\left (2 \, b^{2} \cos \left (f x + e\right )^{3} -{\left (8 \, a b + 5 \, b^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.69381, size = 168, normalized size = 2.33 \begin{align*} \begin{cases} a^{2} x + a b x \sin ^{2}{\left (e + f x \right )} + a b x \cos ^{2}{\left (e + f x \right )} - \frac{a b \sin{\left (e + f x \right )} \cos{\left (e + f x \right )}}{f} + \frac{3 b^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac{3 b^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac{3 b^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac{5 b^{2} \sin ^{3}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{8 f} - \frac{3 b^{2} \sin{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text{for}\: f \neq 0 \\x \left (a + b \sin ^{2}{\left (e \right )}\right )^{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.10804, size = 81, normalized size = 1.12 \begin{align*} \frac{1}{8} \,{\left (8 \, a^{2} + 8 \, a b + 3 \, b^{2}\right )} x + \frac{b^{2} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac{{\left (2 \, a b + b^{2}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]